<template>
  <div>
    <el-select v-bind="$attrs">
      <el-option
        v-for="item in options"
        :key="item. drawingId"
        :label="item.drawingName"
        :value="item.drawingId"
      />
    </el-select>
  </div>
</template>
<script setup>
import { getfloorSelectList } from "@/api/operate/project-management/projectManagement/architectural-settings/index";
const props = defineProps({
  buildingId: {
    type: [String, Number],
    default: ""
  }
});

const options = ref([]);
const getopton = () => {
  if (props.buildingId) {
    getfloorSelectList({ buildingId: props.buildingId }).then(res => {
      options.value = res.result;
    });
  }
};
getopton();
watch(
  () => props.buildingId,
  () => {
    getopton();
  },{
    immediate: true,
  }
);
</script>
<style lang="scss" scoped></style>
